package com.system.arrangement.feign;

import com.system.arrangement.been.Business;
import com.system.arrangement.been.IntervalPlan;
import com.system.arrangement.been.IntervalPlanLst;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 林
 */
@FeignClient(value = "business-service")
public interface BusinessServiceFeign {
    @PostMapping("/business/save")
     boolean saveHandle( Business business);

    @DeleteMapping("/business/del/{id}")
     boolean deleteHandle(@PathVariable("id") int id);

    @PutMapping("/business/update")
     boolean updateHandle( Business business);

    @GetMapping("/business/get/{id}")
     Business getHandle(@PathVariable("id") int id);

    @GetMapping("/business/get/list")
     List<Business> listHandle();

    @GetMapping("/business/get/findByBusinessId/{businessId}")
     Integer findByBusinessId(@PathVariable("businessId") int businessId);

    @PostMapping("/intervalPlan/save")
    boolean saveHandle( IntervalPlan intervalPlan);

    @DeleteMapping("/intervalPlan/del/{id}")
    boolean deleteIntervalPlanHandle(@PathVariable("id") int id);

    @PutMapping("/intervalPlan/update")
    boolean updateHandle(IntervalPlan intervalPlan);

    @GetMapping("/intervalPlan/get/{id}")
    IntervalPlan getIntervalPlanHandle(@PathVariable("id") int id);

    @GetMapping("/intervalPlan/get/list")
    List<IntervalPlan> listIntervalPlanHandle();

    @PostMapping("/intervalPlanLst/save")
    boolean saveIntervalPlanLstHandle( IntervalPlanLst intervalPlanLst);

    @DeleteMapping("/intervalPlanLst/del/{id}")
    boolean deleteIntervalPlanLstHandle(@PathVariable("id") int id);

    @PutMapping("/intervalPlanLst/update")
    boolean updateIntervalPlanLstHandle( IntervalPlanLst intervalPlanLst);

    @GetMapping("/intervalPlanLst/get/{id}")
    IntervalPlanLst getIntervalPlanLstHandle(@PathVariable("id") int id);

    @GetMapping("/intervalPlanLst/get/list")
    List<IntervalPlanLst> listIntervalPlanLstHandle();
    @GetMapping("/intervalPlanLst/get/findAllByIntervalPlanId/{intervalPlanId}")
    List<IntervalPlanLst> findAllByIntervalPlanId(@PathVariable("intervalPlanId") int intervalPlanId);
}
